package com.icart.entities;

import javax.persistence.Column;
import javax.persistence.Id;
import java.io.Serializable;

public class BiServpackitemEntityPK implements Serializable {
    private long packid;
    private long servitemid;

    @Column(name = "packid")
    @Id
    public long getPackid() {
        return packid;
    }

    public void setPackid(long packid) {
        this.packid = packid;
    }

    @Column(name = "servitemid")
    @Id
    public long getServitemid() {
        return servitemid;
    }

    public void setServitemid(long servitemid) {
        this.servitemid = servitemid;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        BiServpackitemEntityPK that = (BiServpackitemEntityPK) o;

        if (packid != that.packid) return false;
        if (servitemid != that.servitemid) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = (int) (packid ^ (packid >>> 32));
        result = 31 * result + (int) (servitemid ^ (servitemid >>> 32));
        return result;
    }
}
